from Base import message, intersect, SS_VALID
from DRG import MDCF_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["39.5004","39.5005","39.5007","39.5009","39.5011","39.5015","39.7905","39.7906","39.9004","39.9009","39.9011","39.9013","39.9015","00.5500x012","00.5502","00.6000","17.5600x001","39.5000x029","39.5000x030","39.5000x031","39.5900x026","39.7900x007","39.7900x019","39.7900x025","39.7900x032","39.7900x042","39.7900x044","39.7900x047","39.7900x051","39.7900x070","39.9000x019","39.9000x021","39.9000x025","39.9000x028","99.1001"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合FN1入组条件，匹配规则：主手术匹配')

    if MDCF_DRG.FN19_group(record):
      return 'FN19'
        
    return 'FN1'
  else:
    return ''
    
